package dev.projectnightfall.network.packets;

/**
 * Abstract class that all other Packet classes extend.
 */
public abstract class APacket {

    /**
     * ID of the packet.
     */
    protected static int packetID = 0;

    /**
     * Returns the ID of the packet.
     *
     * @return Returns the packet ID.
     */
    public static int getID() {
        return packetID;
    }

    /**
     * Executes the current packet with the provided data.
     *
     * @param data Data received over network from server.
     */
    public abstract void execute(String data);
}
